﻿<UserControl     
    x:Class="OrgChart.NodeBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="200" Height="80">

    <Canvas x:Name="canvMain" MouseEnter="canvMain_MouseEnter" MouseLeave="canvMain_MouseLeave" >
        <Rectangle x:Name="recBorder" RadiusX="5" RadiusY="5" Stroke="CornflowerBlue"   StrokeThickness="2">
            <Rectangle.Fill>
                <SolidColorBrush Color='#f2f3fd' />
            </Rectangle.Fill>
        </Rectangle>
        <HyperlinkButton Name="SetRoot"   Canvas.Left="5" Canvas.Top="5" FontSize="9" Click="SetRoot_Click" Canvas.ZIndex="100" ClickMode="Press">SetRoot</HyperlinkButton> 
        
        <TextBlock TextAlignment="left" x:Name="tbEmployeeName" Width="200" Height="20" Foreground="Black" Canvas.Left="5" FontWeight="Bold"></TextBlock>
        <TextBlock TextAlignment="left" x:Name="tbField1" Width="200" Height="20" Foreground="Black" Canvas.Left="5"></TextBlock>
        <TextBlock TextAlignment="left" x:Name="tbField2" Width="200" Height="20" Foreground="Black" Canvas.Left="5"></TextBlock>
        <TextBlock TextAlignment="left" x:Name="tbField3" Width="200" Height="20" Foreground="Black" Canvas.Left="5"></TextBlock>
        <TextBlock TextAlignment="left" x:Name="tbField4" Width="200" Height="20" Foreground="Black" Canvas.Left="5"></TextBlock>
        <TextBlock TextAlignment="left" x:Name="tbField5" Width="200" Height="20" Foreground="Black" Canvas.Left="5"></TextBlock>
     

        <Canvas.Resources>
            <Storyboard x:Name="mouseEnter">
                <ColorAnimation 
                Duration='00:00:01' 
                To='#ffffcc' 
                Storyboard.TargetName='recBorder'    
                Storyboard.TargetProperty='(Shape.Fill).(SolidColorBrush.Color)' />
            </Storyboard>
            <Storyboard x:Name='mouseLeave'>
                <ColorAnimation 
                Duration='00:00:00' 
                To='#f2f3fd' 
                Storyboard.TargetName='recBorder'
                Storyboard.TargetProperty='(Shape.Fill).(SolidColorBrush.Color)' />
            </Storyboard>

        </Canvas.Resources>
        
    </Canvas>

        
     

</UserControl>
